﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Init.PostInit {
    import flash.events.*;
    import Engine.Init.*;
    import Display.*;

    public class DoDisplayDialog extends InitializationAction {

        public static const INIT_ID:String = "DoDialog";

        protected var m_dialog:Dialog;

        public function DoDisplayDialog(_arg1:Dialog){
            super(INIT_ID);
            this.m_dialog = _arg1;
        }
        override public function execute():void{
            this.m_dialog.addEventListener(Event.CLOSE, this.onDialogClose);
            UI.displayPopup(this.m_dialog);
        }
        protected function onDialogClose(_arg1:Event):void{
            this.m_dialog.removeEventListener(Event.CLOSE, this.onDialogClose);
            dispatchEvent(new Event(Event.COMPLETE));
        }

    }
}//package Init.PostInit 
